<template>
  <div>
    <div class="spanSty">
      <span>国家基本公共卫生服务项目第1次产前检查服务记录表</span>
    </div>
    <el-divider content-position="left">编号</el-divider>
    <el-form :model="form" label-width="130px" label-position="left">
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="姓名" prop="userName">
            <el-input v-model="form.userName"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="身份证号" prop="idCard">
            <el-input v-model="form.idCardNo"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="填表日期" prop="completionDate">
            <el-date-picker
              v-model="form.createDate"
              type="date"
              placeholder="选择日期"
              style="width: 100%"
			  value-format="yyyy-MM-dd"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="孕周" prop="gestationalAge">
            <el-input v-model="form.gestationalAge"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="孕妇年龄" prop="womenAge">
            <el-input v-model="form.womenAge"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="丈夫姓名" prop="husbandName">
            <el-input v-model="form.husbandName"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="丈夫年龄" prop="husbandAge">
            <el-input v-model="form.husbandAge"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="丈夫电话" prop="husbandPhone">
            <el-input v-model="form.husbandPhoneNo"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="孕次" prop="pregnanciesNumber">
            <el-input v-model="form.pregnanciesNumber"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12"> </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="产次" prop="vaginalDelivery">
            <el-input
              v-model="form.vaginalDelivery"
              placeholder="阴道分娩(次)"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="产次" prop="Parturition">
            <el-input
              v-model="form.Parturition"
              placeholder="抛宫产(次)"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="末次月经" prop="lastMenstruation">
            <el-date-picker
              v-model="form.lastMenstruation"
              type="date"
              placeholder="选择日期"
              style="width: 100%"
			  value-format="yyyy-MM-dd"

            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="预产期" prop="expectedDate">
            <el-date-picker
              v-model="form.expectedDate"
              type="date"
              placeholder="选择日期"
              style="width: 100%"
			  value-format="yyyy-MM-dd"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="既往史" prop="pastHistory">
            <el-select
              v-model="pastHistoryArr"
              multiple
              style="width: 100%"
              @change="seChange"
            >
              <el-option
                v-for="item in pastHistory"
                :key="item.id"
                :label="item.name"
                :value="item.id"
                :disabled="item.isDisabled"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="家族史" prop="familyHistory">
            <el-select
              v-model="familyHistoryArr"
              multiple
              style="width: 100%"
              @change="seChange1"
            >
              <el-option
                v-for="item in familyHistory"
                :key="item.id"
                :label="item.name"
                :value="item.id"
                :disabled="item.isDisabled"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12" v-if="!(pastHistoryArr.indexOf(8) == -1)">
          <el-form-item label="其他（既往史）" prop="pastHistoryOther">
            <el-input v-model="form.pastHistoryOther"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12" v-if="!(familyHistoryArr.indexOf(4) == -1)">
          <el-form-item label="家族史" prop="familyHistoryOther">
            <el-input v-model="form.familyHistoryOther"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="个人史" prop="personalHistory">
            <el-select
              v-model="personalHistoryArr"
              multiple
              style="width: 100%"
              @change="seChange2"
            >
              <el-option
                v-for="item in personalHistory"
                :key="item.id"
                :label="item.name"
                :value="item.id"
                :disabled="item.isDisabled"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="妇科手术史" prop="surgeryHistory">
            <el-select v-model="form.surgeryHistory" style="width: 100%">
              <el-option
                v-for="item in surgeryHistory"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12" v-if="!(personalHistoryArr.indexOf(7) == -1)">
          <el-form-item label="其他（个人史）" prop="personalHistoryOther">
            <el-input v-model="form.personalHistoryOther"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12" v-if="[0].includes(form.surgeryHistory)">
          <el-form-item label="（妇科手术史）" prop="surgeryHistoryContent">
            <el-input v-model="form.surgeryHistoryContent"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="孕产史" prop="spontaneousAbortion">
            <el-input
              v-model="form.spontaneousAbortion"
              placeholder="自然流产"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="孕产史" prop="artificialAbortion">
            <el-input
              v-model="form.gestationHistory"
              placeholder="人工流产"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="孕产史" prop="Stillbirth">
            <el-input v-model="form.Stillbirth" placeholder="死胎"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="孕产史" prop="Stillbirth">
            <el-input v-model="form.Stillbirth" placeholder="死产"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="孕产史" prop="neonatalDeath">
            <el-input
              v-model="form.neonatalDeath"
              placeholder="新生儿死亡"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="孕产史" prop="birthDefects">
            <el-input
              v-model="form.birthDefects"
              placeholder="出生缺陷儿"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="身高" prop="height">
            <el-input v-model="form.height" placeholder="(cm)"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="体重" prop="weight">
            <el-input v-model="form.weight" placeholder="(kg)"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="体质指数" prop="BodyMassIndex">
            <el-input
              v-model="form.BodyMassIndex"
              placeholder="(kg/m²)"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="血压" prop="bloodPressure">
            <el-input
              v-model="form.bloodPressure"
              placeholder="(mmHg)"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-divider content-position="left">听诊</el-divider>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="心脏" prop="heart">
            <el-select v-model="form.auscultation.heart" style="width: 100%">
              <el-option
                v-for="item in heart"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="肺部" prop="lungs">
            <el-select v-model="form.auscultation.lungs" style="width: 100%">
              <el-option
                v-for="item in heart"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12" v-if="[2].includes(form.heart)">
          <el-form-item label="异常（心脏）" prop="heartContent">
            <el-input v-model="form.heartContent"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12" v-if="[2].includes(form.lungs)">
          <el-form-item label="异常（肺部）" prop="lungsContent">
            <el-input v-model="form.lungsContent"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-divider content-position="left">妇科检查</el-divider>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="外阴" prop="vulva">
            <el-select v-model="form.gynecologicalExamination.vulva" style="width: 100%">
              <el-option
                v-for="item in heart"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="阴道" prop="vagina">
            <el-select v-model="form.gynecologicalExamination.vagina" style="width: 100%">
              <el-option
                v-for="item in heart"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12" v-if="[2].includes(form.vulva)">
          <el-form-item label="异常（外阴）" prop="vulvaContent">
            <el-input v-model="form.vulvaContent"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12" v-if="[2].includes(form.vagina)">
          <el-form-item label="异常（阴道）" prop="vaginaContent">
            <el-input v-model="form.vaginaContent"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="宫颈" prop="cervix">
            <el-select v-model="form.gynecologicalExamination.cervix" style="width: 100%">
              <el-option
                v-for="item in heart"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="子宫" prop="uterus">
            <el-select v-model="form.gynecologicalExamination.uterus" style="width: 100%">
              <el-option
                v-for="item in heart"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12" v-if="[2].includes(form.cervix)">
          <el-form-item label="异常（宫颈）" prop="cervixContent">
            <el-input v-model="form.cervixContent"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12" v-if="[2].includes(form.uterus)">
          <el-form-item label="异常（子宫）" prop="uterusContent">
            <el-input v-model="form.uterusContent"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="附件" prop="enclosure">
            <el-select v-model="form.enclosure" style="width: 100%">
              <el-option
                v-for="item in heart"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12" v-if="[2].includes(form.enclosure)">
          <el-form-item label="异常（附件）" prop="enclosureContent">
            <el-input v-model="form.enclosureContent"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-divider content-position="left">辅助检查</el-divider>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="血常规" prop="height">
            <el-input
              v-model="form.hemoglobin"
              placeholder="血红蛋白(g/L)"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="血常规" prop="WBCCount">
            <el-input
              v-model="form.WBCCount"
              placeholder="白细胞计数值(/L)"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="血常规" prop="plateletCount">
            <el-input
              v-model="form.plateletCount"
              placeholder="血小板计数值(/L)"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="血常规" prop="routineBloodOther">
            <el-input
              v-model="form.routineBloodOther"
              placeholder="其他"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="尿常规" prop="urineProtein">
            <el-input
              v-model="form.urineProtein"
              placeholder="尿蛋白"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="尿常规" prop="urineSugar">
            <el-input v-model="form.urineSugar" placeholder="尿糖"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="尿常规" prop="urinaryKetoneBody">
            <el-input
              v-model="form.urinaryKetoneBody"
              placeholder="尿酮体"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="尿常规" prop="bld">
            <el-input v-model="form.bld" placeholder="尿潜血"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="尿常规" prop="urinalysisOther">
            <el-input
              v-model="form.urinalysisOther"
              placeholder="其他"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="血型" prop="bloodType">
            <el-select v-model="form.bloodType" style="width: 100%">
              <el-option
                v-for="item in bloodType"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="RH" prop="RH">
            <el-select v-model="form.RH" style="width: 100%">
              <el-option
                v-for="item in RH"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="血糖" prop="bloodSugar">
            <el-input
              v-model="form.auxiliaryExamination.bloodSugar"
              placeholder="(mmol/L)*"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="肝功能" prop="serumAlanine">
            <el-input
              v-model="form.auxiliaryExamination.liverFunction.serumAlanineAminotransferase"
              placeholder="血清谷丙转氨酶(U/L)"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="肝功能" prop="serumGlutamic">
            <el-input
              v-model="form.auxiliaryExamination.liverFunction.serumAspartateAminotransferase"
              placeholder="血清谷草转氨酶(U/L)"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="肝功能" prop="bloodProtein">
            <el-input
              v-model="form.auxiliaryExamination.liverFunction.albumin"
              placeholder="血蛋白(g/L)"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="肝功能" prop="totalBilirubin">
            <el-input
              v-model="form.auxiliaryExamination.liverFunction.totalBilirubin"
              placeholder="总胆红素(μmol/L)"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="肝功能" prop="conjugatedBilirubin">
            <el-input
              v-model="form.auxiliaryExamination.liverFunction.conjugatedBilirubin"
              placeholder="结合胆红素(μmol/L)"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12"> </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="肾功能" prop="serumCreatinine">
            <el-input
              v-model="form.auxiliaryExamination.kidneyFunction.serumCreatinine"
              placeholder="血清肌酐(μmol/L)"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="肾功能" prop="bloodUrea">
            <el-input
              v-model="form.auxiliaryExamination.kidneyFunction.bloodUrea"
              placeholder="血尿素(μmol/L)"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="阴道分泌物" prop="vaginalDischarge">
            <el-select
              v-model="form.auxiliaryExamination.vaginalDischarge"
              multiple
              style="width: 100%"
              @change="seChange3"
            >
              <el-option
                v-for="item in vaginalDischarge"
                :key="item.id"
                :label="item.name"
                :value="item.id"
                :disabled="item.isDisabled"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="阴道清洁度" prop="vaginalCleanliness">
            <el-select v-model="form.vaginalCleanliness" style="width: 100%">
              <el-option
                v-for="item in vaginalCleanliness"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col
          :lg="12"
          :xl="12"
          v-if="!(vaginalDischargeArr.indexOf(4) == -1)"
        >
          <el-form-item label="其他（阴道分泌物）" prop="vaginalDischargeOther">
            <el-input v-model="form.others"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12"> </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="乙型肝炎五项" prop="surfaceAntigen">
            <el-input
              v-model="form.auxiliaryExamination.hepatitisB.hepatitisBSurfaceAntigen"
              placeholder="乙型肝炎表面抗原"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="乙型肝炎五项" prop="surfaceAntibody">
            <el-input
              v-model="form.auxiliaryExamination.hepatitisB.hepatitisBSurfaceAntibody"
              placeholder="乙型肝炎表面抗体"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="乙型肝炎五项" prop="eAntigen">
            <el-input
              v-model="form.auxiliaryExamination.hepatitisB.hepatitisBEAntigen"
              placeholder="乙型肝炎e抗原"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="乙型肝炎五项" prop="eAntibody">
            <el-input
              v-model="form.auxiliaryExamination.hepatitisB.hepatitisBEAntibody"
              placeholder="乙型肝炎e抗体"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="乙型肝炎五项" prop="coreAntibody">
            <el-input
              v-model="form.auxiliaryExamination.hepatitisB.hepatitisBCoreAntibody"
              placeholder="乙型肝炎核心抗体"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12"> </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="梅毒血清学试验" prop="syphilisSerological">
            <el-select v-model="form.syphilisSerological" style="width: 100%">
              <el-option
                v-for="item in syphilisSerological"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="HIV抗体检测" prop="HIVAntibody">
            <el-select v-model="form.auxiliaryExamination.hivAntibodyTest" style="width: 100%">
              <el-option
                v-for="item in syphilisSerological"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="B超" prop="BMode">
            <el-input v-model="form.auxiliaryExamination.ultrasound"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="其他" prop="Other">
            <el-input v-model="form.auxiliaryExamination.others"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="总体评估" prop="overallAssessment">
            <el-select v-model="form.overallAssessment" style="width: 100%">
              <el-option
                v-for="item in heart"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="保健指导" prop="healthGuidance">
            <el-select
              v-model="healthGuidanceArr"
              multiple
              style="width: 100%"
              @change="seChange4"
            >
              <el-option
                v-for="item in healthGuidance"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12" v-if="[2].includes(form.overallAssessment)">
          <el-form-item label="异常（总体评估）" prop="overallAssessmentContent">
            <el-input v-model="form.overallAssessmentContent"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12"  v-if="!(healthGuidanceArr.indexOf(6) == -1)">
          <el-form-item label="其他（保健指导）" prop="healthGuidanceOther">
            <el-input v-model="form.healthGuidanceOther"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="建册情况" prop="establishment">
            <el-select v-model="form.establishment" style="width: 100%">
              <el-option
                v-for="item in establishment"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12" v-if="[2].includes(form.establishment)">
          <el-form-item label="(建册情况)" prop="establishmentContent">
            <el-input v-model="form.establishmentContent"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-divider content-position="left">转诊</el-divider>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="转诊有无" prop="isReferral">
            <el-select v-model="form.isReferral" style="width: 100%">
              <el-option
                v-for="item in isReferral"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="原因" prop="reason">
            <el-input v-model="form.referral.reason"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="转诊机构" prop="referralInstitution">
            <el-input v-model="form.referral.department"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="转诊科室" prop="referralDepartment">
            <el-input v-model="form.referralDepartment"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="转诊联系人" prop="referralContact">
            <el-input v-model="form.referral.contactName"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="转诊联系方式" prop="ReferralInformation">
            <el-input v-model="form.referral.contactPhoneNo"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="结果" prop="result">
            <el-select v-model="form.referral.conclusion" style="width: 100%">
              <el-option
                v-for="item in result"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="下次随访日期" prop="followUpDate">
            <el-date-picker
              v-model="form.nextFollowupDate"
              type="date"
              placeholder="选择日期"
              style="width: 100%"
			  value-format="yyyy-MM-dd"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="随访医生" prop="followUpDoctor">
            <el-input v-model="form.followUpDoctor"></el-input>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="随访医生签名" prop="doctorSignature">
            <el-upload
              class="upload-demo"
              action=""
              list-type="picture-card"
              :before-remove="beforeRemove"
              :on-change="onprogress"
              accept=".jpg,.png,"
              :multiple="false"
              :limit="1"
              :on-exceed="onExceed"
              :file-list="fileList"
              :auto-upload="false"
            >
              <em class="el-icon-plus"></em>
              <div slot="tip" class="el-upload__tip">
                只能上传jpg/png文件，且不超过500kb
              </div>
            </el-upload>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :lg="12" :xl="12">
          <el-form-item label="居民签名" prop="residentSignature">
            <el-upload
              class="upload-demo"
              action=""
              list-type="picture-card"
              :before-remove="beforeRemove1"
              :on-change="onprogress1"
              accept=".jpg,.png,"
              :multiple="false"
              :limit="1"
              :on-exceed="onExceed1"
              :file-list="fileList1"
              :auto-upload="false"
            >
              <em class="el-icon-plus"></em>
              <div slot="tip" class="el-upload__tip">
                只能上传jpg/png文件，且不超过500kb
              </div>
            </el-upload>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :xl="12">
          <el-form-item label="现场图片" prop="Scene pictures">
            <el-upload
              class="upload-demo"
              action=""
              list-type="picture-card"
              :before-remove="beforeRemove2"
              :on-change="onprogress2"
              accept=".jpg,.png,"
              :multiple="false"
              :limit="1"
              :on-exceed="onExceed2"
              :file-list="fileList2"
              :auto-upload="false"
            >
              <em class="el-icon-plus"></em>
              <div slot="tip" class="el-upload__tip">
                只能上传jpg/png文件，且不超过500kb
              </div>
            </el-upload>
          </el-form-item>
        </el-col>
      </el-row>
			<el-row type="flex" class="submitSty">
			  <HButton type="add" @click="submit">提交</HButton>
			</el-row>
    </el-form>
  </div>
</template>

<script>
import {
  pastHistory,
  familyHistory,
  personalHistory,
  surgeryHistory,
  heart,
  bloodType,
  RH,
  vaginalDischarge,
  vaginalCleanliness,
  syphilisSerological,
  healthGuidance,
  establishment,
  isReferral,
  result,

} from "@/api/followForms/firstInspect";
import {add, firstAntenatalExamination} from"@/api/formData"
export default {
  data() {
    return {
      form: {
        "age": '',
        "assessment": "",
        "auscultation": {
          "heart": "",
          "lungs": ""
        },
        "auxiliaryExamination": {
          "bloodSugar": '',
          "bloodType": "",
          "hepatitisB": {             //乙肝五项
            "hepatitisBCoreAntibody": '',    //肝炎核心抗体
            "hepatitisBEAntibody": "",       //肝炎抗体
            "hepatitisBEAntigen": "",        //肝炎抗原
            "hepatitisBSurfaceAntibody": "", //肝炎表面抗体
            "hepatitisBSurfaceAntigen": ""   //肝炎表面抗原
          },
          "hivAntibodyTest": '',    //HIV抗体检测
          "kidneyFunction": {     //肾功能
            "bloodUrea": "",      //血尿素
            "serumCreatinine": ""  //血清肌酐
          },
          "liverFunction": {     //肝功能q
            "albumin": "",         //白蛋白
            "conjugatedBilirubin": "", //结合胆红素
            "serumAlanineAminotransferase": "", //血清谷丙转氨酶
            "serumAspartateAminotransferase":"",//血清谷草转氨酶
            "totalBilirubin": ""//总胆红素
          },
          "others": "",
          "rhNegative": "",
          "syphilisSerologyTest": "",
          "ultrasound": "",
          "vaginalCleanliness": "",
          "vaginalDischarge": ""
        },
        "bMI": "",
        "bloodPressure": "",
        "cesareanSectionTimes": "",
        "createDate": "",
        "doctorSignature": "",
        "dueDate": "",
        "fileConstruction": "",
        "gestationHistory": "",
        "gynecologicalExamination": {
          "attachment": "",
          "cervix": "",
          "uterus": "",
          "vagina": "",
          "vulva": ""
        },
        "height": "",
        "husbandAge": "",
        "husbandName": "",
        "husbandPhoneNo": "",
        "id": "",
        "lastMenstrualPeriod": "",
        "nextFollowupDate": "",
        "pregnancyTimes": "",
        "pregnancyWeek": "",
        "referral": {
          "conclusion": "",
          "contactName": "",
          "contactPhoneNo": "",
          "department": "",
          "reason": ""
        },
        "serialNo": "",
        "sign": {
          "signature": "",
          "signatureType": ""
        },
        "vaginalDeliveryTimes": "",
        "weight": ""
      },
      pastHistory: pastHistory,
      familyHistory: familyHistory,
      personalHistory: personalHistory,
      surgeryHistory: surgeryHistory,
      heart: heart,
      bloodType: bloodType,
      RH: RH,
      vaginalDischarge: vaginalDischarge,
      vaginalCleanliness: vaginalCleanliness,
      syphilisSerological: syphilisSerological,
      healthGuidance: healthGuidance,
      establishment:establishment,
      isReferral:isReferral,
      result:result,
      pastHistoryArr: [],
      familyHistoryArr: [],
      personalHistoryArr: [],
      vaginalDischargeArr: [],
      healthGuidanceArr:[],
      fileList:[],
      fileList1:[],
      fileList2:[],
    };
  },
  created() {},
  methods: {
    //提交
    submit() {
	// var json = 	JSON.stringify(this.form)
	// var data = {
	// 	"id":this.form.id,
	// 	"type":"CQDYC",
	// 	"otherData":json
	// }
  firstAntenatalExamination(this.form).then(res=>{
		console.log(res)
	})
    },
    //多选封装
    select(value, options) {
      if (!(value.indexOf(1) == -1)) {
        options.forEach((e) => {
          if (e.id != 1) {
            e.isDisabled = true;
          } else {
            e.isDisabled = false;
          }
        });
      } else if (value.length == 0) {
        options.forEach((e) => {
          e.isDisabled = false;
        });
      } else {
        options.forEach((e) => {
          if (e.id == 1) {
            e.isDisabled = true;
          } else {
            e.isDisabled = false;
          }
        });
      }
    },
    //既往史选择
    seChange(value) {
      this.form.pastHistory = this.pastHistoryArr.toString();
      this.select(value, this.pastHistory);
    },
    //家族史选择
    seChange1(value) {
      this.form.familyHistory = this.familyHistoryArr.toString();
      this.select(value, this.familyHistory);
    },
    //个人史选择
    seChange2(value) {
      this.form.personalHistory = this.personalHistoryArr.toString();
      this.select(value, this.personalHistory);
    },
    //阴道分泌物选择
    seChange3(value) {
      this.form.vaginalDischarge = this.vaginalDischargeArr.toString();
      this.select(value, this.vaginalDischarge);
    },
    //保健指导选择
    seChange4(value) {
      this.form.healthGuidance = this.healthGuidanceArr.toString();
    },
    beforeRemove(file, fileList) {
      return this.$confirm(`确定移除 ${file.name}？`);
    },
    onprogress(file, fileList) {
      this.fileList = fileList;
      const fileSize = file.size / 1024 < 500;
      if (!fileSize) {
        this.$message.warning("不能超过500kb！");
        this.fileList.pop();
      }
    },
    onExceed() {
      this.$message.error("最多上传1个！");
    },
    beforeRemove1(file, fileList) {
      return this.$confirm(`确定移除 ${file.name}？`);
    },
    onprogress1(file, fileList) {
      this.fileList1 = fileList;
      const fileSize = file.size / 1024 < 500;
      if (!fileSize) {
        this.$message.warning("不能超过500kb！");
        this.fileList.pop();
      }
    },
    onExceed1() {
      this.$message.error("最多上传1个！");
    },
    beforeRemove2(file, fileList) {
      return this.$confirm(`确定移除 ${file.name}？`);
    },
    onprogress2(file, fileList) {
      this.fileList2 = fileList;
      const fileSize = file.size / 1024 < 500;
      if (!fileSize) {
        this.$message.warning("不能超过500kb！");
        this.fileList.pop();
      }
    },
    onExceed2() {
      this.$message.error("最多上传1个！");
    },
  },
};
</script>

<style lang="less" scoped>
.spanSty {
  font-size: 30px;
  width: 900px;
  margin-bottom: 20px;
  margin-left: 20%;
}
.submitSty {
  float: right;
  margin-right: 45%;
}
</style>
